home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / myghty.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  3KB  |  131 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  4.  
  5. <!--
  6. <MODE NAME="myghty"            FILE="myghty.xml"
  7.                 FILE_NAME_GLOB="*.myt"/>
  8. -->
  9.  
  10. <MODE>
  11.     <PROPS>
  12.         <PROPERTY NAME="commentStart" VALUE="<!--" />
  13.         <PROPERTY NAME="commentEnd" VALUE="-->" />
  14.     </PROPS>
  15.     <RULES IGNORE_CASE="TRUE">
  16.  
  17.         <EOL_SPAN TYPE="COMMENT2" AT_LINE_START="TRUE">#</EOL_SPAN>
  18.         <!-- <SEQ TYPE="LITERAL4" AT_LINE_END="TRUE">\</SEQ> -->
  19.  
  20.         <!-- attr block (python) -->
  21.         <SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
  22.             <BEGIN><%attr></BEGIN>
  23.             <END></%attr></END>
  24.         </SPAN>
  25.  
  26.         <!-- def, closure, method -->
  27.         <SPAN_REGEXP HASH_CHAR="<%" TYPE="LITERAL4" DELEGATE="DEF">
  28.             <BEGIN><%(def|closure|method)</BEGIN>
  29.             <END>></END>
  30.         </SPAN_REGEXP>
  31.         <SEQ_REGEXP HASH_CHAR="</%" TYPE="LITERAL4"></%(def|closure|method)></SEQ_REGEXP>
  32.  
  33.         <!-- doc block -->
  34.         <SPAN TYPE="COMMENT4">
  35.             <BEGIN><%doc></BEGIN>
  36.             <END></%doc></END>
  37.         </SPAN>
  38.  
  39.         <!-- flags block (python) -->
  40.         <SPAN DELEGATE="MYGHTY" TYPE="LITERAL4">
  41.             <BEGIN><%flags></BEGIN>
  42.             <END></%flags></END>
  43.         </SPAN>
  44.  
  45.         <!-- python block -->
  46.         <SPAN_REGEXP HASH_CHAR="<%python" DELEGATE="MYGHTY" TYPE="LITERAL4">
  47.             <BEGIN><%python[^>]*></BEGIN>
  48.             <END></%python></END>
  49.         </SPAN_REGEXP>
  50.  
  51.         <!-- python block aliases - don't take args -->
  52.         <SPAN_REGEXP HASH_CHAR="<%" DELEGATE="MYGHTY" TYPE="LITERAL4">
  53.             <BEGIN><%(args|cleanup|filter|global|init|once|requestlocal|requestonce|shared|threadlocal|threadonce)></BEGIN>
  54.             <END></%$1></END>
  55.         </SPAN_REGEXP>
  56.  
  57.         <!-- text block -->
  58.         <SPAN TYPE="LITERAL3">
  59.             <BEGIN><%text></BEGIN>
  60.             <END></%text></END>
  61.         </SPAN>
  62.  
  63.         <!-- calling component -->
  64.         <SEQ TYPE="LITERAL4"></&></SEQ>
  65.         <SPAN_REGEXP HASH_CHAR="<&" TYPE="LITERAL4" DELEGATE="MYGHTY">
  66.             <BEGIN><&[|]?</BEGIN>
  67.             <END>&></END>
  68.         </SPAN_REGEXP>
  69.  
  70.         <!-- substitutions -->
  71.         <SPAN TYPE="LITERAL3" DELEGATE="MYGHTY">
  72.             <BEGIN><%</BEGIN>
  73.             <END>%></END>
  74.         </SPAN>
  75.  
  76.         <EOL_SPAN 
  77.             AT_LINE_START="TRUE" 
  78.             DELEGATE="MYGHTY" 
  79.             TYPE="LITERAL4">%</EOL_SPAN>
  80.  
  81.         <IMPORT DELEGATE="html::MAIN"/>
  82.  
  83.         <KEYWORDS>
  84.             <!-- only here for complete-word -->
  85.             <NULL>args</NULL>
  86.             <NULL>attr</NULL>
  87.             <NULL>cleanup</NULL>
  88.             <NULL>closure</NULL>
  89.             <NULL>def</NULL>
  90.             <NULL>doc</NULL>
  91.             <NULL>filter</NULL>
  92.             <NULL>flags</NULL>
  93.             <NULL>global</NULL>
  94.             <NULL>init</NULL>
  95.             <NULL>method</NULL>
  96.             <NULL>once</NULL>
  97.             <NULL>python</NULL>
  98.             <NULL>requestlocal</NULL>
  99.             <NULL>requestonce</NULL>
  100.             <NULL>shared</NULL>
  101.             <NULL>threadlocal</NULL>
  102.             <NULL>threadonce</NULL>
  103.         </KEYWORDS>
  104.  
  105.     </RULES>
  106.  
  107.     <RULES IGNORE_CASE="FALSE" SET="MYGHTY">
  108.         <!-- alias for MODULE -->
  109.         <SEQ TYPE="KEYWORD4">@</SEQ>
  110.         <IMPORT DELEGATE="python::MAIN"/>
  111.         <KEYWORDS>
  112.             <KEYWORD4>ARGS</KEYWORD4>
  113.             <KEYWORD4>MODULE</KEYWORD4>
  114.             <KEYWORD4>SELF</KEYWORD4>
  115.             <KEYWORD4>m</KEYWORD4>
  116.             <!-- request -->
  117.             <KEYWORD4>r</KEYWORD4>
  118.             <!-- session -->
  119.             <KEYWORD4>s</KEYWORD4>
  120.             <!-- URL encode -->
  121.             <KEYWORD4>u</KEYWORD4>
  122.             <!-- HTML encode -->
  123.             <KEYWORD4>h</KEYWORD4>
  124.         </KEYWORDS>
  125.     </RULES>
  126.  
  127.     <!-- only exists to color component name like a function -->
  128.     <RULES IGNORE_CASE="TRUE" SET="DEF" DEFAULT="FUNCTION">
  129.     </RULES>
  130. </MODE>
  131.